/**
 * 
 */
package truerefactor.refactor;

import java.util.List;

import truerefactor.graph.ClassNode;
import truerefactor.graph.CodeGraph;
import truerefactor.graph.CodeNode;

/**
 * An implementation of the Separate Query From Modifier Refactoring Technique
 * 
 * @author Isaac
 */
public class SeparateQueryFromModifier extends Refactoring {

    /**
     * 
     */
    public SeparateQueryFromModifier()
    {
        this.name = "Separate Query From Modifier";
        this.description = "";
    }

    /*
     * (non-Javadoc)
     * @see
     * truerefactor.refactor.Refactoring#execute(truerefactor.graph.CodeNode
     * [])
     */
    @Override
    public void execute(CodeGraph graph)
    {
        // 1. Create a query that returns the same value as the original method.
        // a. Look in the original method to see what is returned. If the
        // returned value is a temporary, look at the location of the temp
        // assignment.

        // 2. Modify the original method so that it returns the result of a call
        // to the query.
        // a. Every return in the original method should say "return newQuery()"
        // instead of returning anything else
        // b. If the method used a temp to with a single assignment to capture
        // the return value, you should be be able to remove it.

        // 3. For each call, replace the single call to the original method with
        // a call t the query. Add a call to the original method before the line
        // that calls the query.

        // 4. Make the original method have a void return type and remove the
        // return expressions.
    }
}
